
// #ifndef VUE3
import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
import http from './public/request.js' // 引入请求封装工具方法
import { showT, axiosError, checkToken } from "@/public/common.js";
import loadCarBadge from "./public/loadCarBadge.js" // 动态加载购物车徽标

// 页面加载，立即执行一次获取购物车徽标显示
loadCarBadge()

uni.$loadCarBadge = loadCarBadge;

// 封装axios请求
uni.$http = http;
// 封装处理函数
uni.$showT = showT;
uni.$axiosError = axiosError;
uni.$checkToken = checkToken;

// 图片获取根路径 阿里云OSS图片地址
uni.$baseUrl = "https://uni-mall-maohe.oss-cn-guangzhou.aliyuncs.com/uni_mall/"

export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif